public class DeviceSystem {
    public static void main(String[] args) {
        Device printer = new printer("佳能MG3080", "192.168.1.101");
        Device smartBoard = new SmartBoard("希沃", "192.168.1.102");

        // 多态数组
        Device[] allDevices = {printer, smartBoard};
        System.out.println("==== 所有设备信息 ====");
        for (Device d : allDevices) {
            System.out.println(d.getInfo());
        }

        NetworkDevice[] networkDevices = {
                (NetworkDevice) printer,
                (NetworkDevice) smartBoard
        };
        DeviceManager.manageNetworkDevices(networkDevices);

        UsbDevice[] usbDevices = {(UsbDevice) printer};
        DeviceManager.manageUsbDevices(usbDevices);
    }
}
